﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>jQuery EasyUI Extensions - Messager</title>

    <link href="../../jquery-easyui-themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../jquery-easyui-themes/icon.css" rel="stylesheet" type="text/css" />

    <script src="../../jquery/jquery-1.11.2.js" type="text/javascript"></script>
    <script src="../../jquery-easyui-1.4.2/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../../jquery-easyui-1.4.2/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>

    <script src="../../jquery-extensions/jquery.jdirk.js" type="text/javascript"></script>
    <link href="../../jeasyui-extensions/jeasyui.extensions.css" rel="stylesheet" />

    <script src="../../jeasyui-extensions/jeasyui.extensions.messager.js"></script>

    <script type="text/javascript">
        $(function () {

            $("#btn01").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "topLeft" }); });

            $("#btn02").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "topCenter" }); });

            $("#btn03").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "topRight" }); });

            $("#btn04").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "centerLeft" }); });

            $("#btn05").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "center" }); });

            $("#btn06").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "centerRight" }); });

            $("#btn07").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "bottomLeft" }); });

            $("#btn08").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "bottomCenter" }); });

            $("#btn09").click(function () { $.easyui.messager.show({ msg: "hello easyui", position: "bottomRight" }); });




            $("#btn11").click(function () { $.easyui.messager.alert("提示消息"); });

            $("#btn12").click(function () { $.easyui.messager.alert("提示消息", function () { alert("确定"); }); });

            $("#btn13").click(function () { $.easyui.messager.alert("提示消息", "这是提醒消息的内容"); });

            $("#btn14").click(function () { $.easyui.messager.alert("提示消息", "这是提醒消息的内容", function () { alert("确定"); }); });

            $("#btn15").click(function () { $.easyui.messager.alert("提示消息", "这是提醒消息的内容", "question"); });

            $("#btn16").click(function () { $.easyui.messager.alert("提示消息", "这是提醒消息的内容", "question", function () { alert("确定"); }); });

            $("#btn17").click(function () { $.easyui.messager.alert({ title: "提示消息", msg: "这是提醒消息的内容", info: "question", handler: function () { alert("确定"); } }); });




            $("#btn21").click(function () { $.easyui.messager.confirm("你确定要打死这个逗逼？"); });

            $("#btn22").click(function () { $.easyui.messager.confirm("你确定要打死这个逗逼？", function (c) { alert(c); }); });

            $("#btn23").click(function () { $.easyui.messager.confirm("操作提醒xxx", "你确定要打死这个逗逼？"); });

            $("#btn24").click(function () { $.easyui.messager.confirm("操作提醒xxx", "你确定要打死这个逗逼？", function (c) { alert(c); }); });

            $("#btn25").click(function () { $.easyui.messager.confirm({ title: "操作提醒xxx", msg: "你确定要打死这个逗逼？", handler: function (c) { alert(c); } }); });



            $("#btn31").click(function () { $.easyui.messager.prompt("请输入..."); });

            $("#btn32").click(function () { $.easyui.messager.prompt("请输入...", function (text) { alert(text); }); });

            $("#btn33").click(function () { $.easyui.messager.prompt("操作提醒xxx", "请输入..."); });

            $("#btn34").click(function () { $.easyui.messager.prompt("操作提醒xxx", "请输入...", function (text) { alert(text); }); });

            $("#btn35").click(function () { $.easyui.messager.prompt({ title: "操作提醒xxx", msg: "请输入...", handler: function (text) { alert(text); } }); });



            $("#btn41").click(function () { $.easyui.messager.progress("正在执行..."); });

            $("#btn42").click(function () { $.easyui.messager.progress("正在执行...", 100); });

            $("#btn43").click(function () { $.easyui.messager.progress("操作提醒xxx", "正在执行..."); });

            $("#btn44").click(function () { $.easyui.messager.progress("操作提醒xxx", "正在执行...", "数据正在提交..."); });

            $("#btn45").click(function () { $.easyui.messager.progress("操作提醒xxx", "正在执行...", 100); });

            $("#btn46").click(function () { $.easyui.messager.progress("操作提醒xxx", "正在执行...", "数据正在提交...", 100); });

            $("#btn47").click(function () { $.easyui.messager.progress("操作提醒xxx", "正在执行...", 100, "数据正在提交..."); });

            $("#btn48").click(function () {
                $.easyui.messager.progress({ title: "操作提醒xxx", msg: "正在执行...", interval: 100, text: "数据正在提交..." });
                $.util.delay(function () {
                    alert($.easyui.messager.progress("bar").length);
                }, 1000);
                $.util.delay(function () {
                    $.easyui.messager.progress("close");
                }, 2000);
            });

            $("#btn49").click(function () { alert($.easyui.messager.progress("bar").length); });

            $("#btn50").click(function () { $.easyui.messager.progress("close"); });



            $("#btn51").click(function () { $.easyui.messager.solicit("您要现在打死这个逗逼？"); });

            $("#btn52").click(function () { $.easyui.messager.solicit("您要现在打死这个逗逼？", function (i, c) { alert(c); }); });

            $("#btn53").click(function () { $.easyui.messager.solicit("操作提醒xxx", "您要现在打死这个逗逼？"); });

            $("#btn54").click(function () { $.easyui.messager.solicit("操作提醒xxx", "您要现在打死这个逗逼？", function (i, c) { alert(c); }); });

            $("#btn55").click(function () { $.easyui.messager.solicit({ title: "操作提醒xxx", msg: "您要现在打死这个逗逼？", handler: function (i, c) { alert(c); } }); });



            $("#btn61").click(function () {
                $.messager.buttonsbox([{ text: "按钮1" }, { text: "按钮2" }, { text: "按钮3" }]);
            });

            $("#btn62").click(function () {
                $.messager.buttonsbox([
                    { text: "按钮1", value: "a" }, { text: "按钮2", value: "b" }, { text: "按钮3", value: "c" }
                ],
                    function (index, value) {
                        $.messager.show($.string.format("index: {0}, value: {1}", index, value));
                    });
            });

            $("#btn63").click(function () {
                $.messager.buttonsbox("你要干死这个逗逼？", [
                    { text: "按钮1", value: "a" }, { text: "按钮2", value: "b" }, { text: "按钮3", value: "c" }
                ]);
            });

            $("#btn64").click(function () {
                $.messager.buttonsbox("你要干死这个逗逼？", [
                    { text: "按钮1", value: "a" }, { text: "按钮2", value: "b" }, { text: "按钮3", value: "c" }
                ],
                    function (index, value) {
                        $.messager.show($.string.format("index: {0}, value: {1}", index, value));
                    });
            });

            $("#btn65").click(function () {
                $.messager.buttonsbox("操作提醒xxx", "你要干死这个逗逼？", [
                    { text: "按钮1", value: "a" }, { text: "按钮2", value: "b" }, { text: "按钮3", value: "c" }
                ]);
            });

            $("#btn66").click(function () {
                $.messager.buttonsbox("操作提醒xxx", "你要干死这个逗逼？", [
                    { text: "按钮1", value: "a" }, { text: "按钮2", value: "b" }, { text: "按钮3", value: "c" }
                ],
                    function (index, value) {
                        $.messager.show($.string.format("index: {0}, value: {1}", index, value));
                    });
            });

            $("#btn67").click(function () {
                $.messager.buttonsbox({
                    title: "操作提醒xxx",
                    msg: "你要干死这个逗逼？",
                    buttons: [
                        { iconCls: "icon-ok", text: "确定打死他", value: true },
                        { iconCls: "icon-cancel", text: "让他再活一会儿", value: false }
                    ],
                    handler: function (index, value) {
                        $.messager.show($.string.format("index: {0}, value: {1}", index, value));
                    },
                    width: 400, height: 140, buttonsAlign: "right"
                });
            });

        });
    </script>
</head>
<body>

    <div style="margin: 20px;">
        <input id="btn01" type="button" value="show-topLeft" />
        <input id="btn02" type="button" value="show-topCenter" />
        <input id="btn03" type="button" value="show-topRight" />
        <br /><br />
        <input id="btn04" type="button" value="show-centerLeft" />
        <input id="btn05" type="button" value="show-center" />
        <input id="btn06" type="button" value="show-centerRight" />
        <br /><br />
        <input id="btn07" type="button" value="show-bottomLeft" />
        <input id="btn08" type="button" value="show-bottomCenter" />
        <input id="btn09" type="button" value="show-bottomRight" />

        <br /><br /><hr /><br />

        <input id="btn11" type="button" value="alert-1" />
        <input id="btn12" type="button" value="alert-2" />
        <input id="btn13" type="button" value="alert-3" />
        <input id="btn14" type="button" value="alert-4" />
        <input id="btn15" type="button" value="alert-5" />
        <input id="btn16" type="button" value="alert-6" />
        <input id="btn17" type="button" value="alert-7" />

        <br /><br /><hr /><br />

        <input id="btn21" type="button" value="confirm-1" />
        <input id="btn22" type="button" value="confirm-2" />
        <input id="btn23" type="button" value="confirm-3" />
        <input id="btn24" type="button" value="confirm-4" />
        <input id="btn25" type="button" value="confirm-5" />

        <br /><br /><hr /><br />

        <input id="btn31" type="button" value="prompt-1" />
        <input id="btn32" type="button" value="prompt-2" />
        <input id="btn33" type="button" value="prompt-3" />
        <input id="btn34" type="button" value="prompt-4" />
        <input id="btn35" type="button" value="prompt-5" />

        <br /><br /><hr /><br />

        <input id="btn41" type="button" value="progress-1" />
        <input id="btn42" type="button" value="progress-2" />
        <input id="btn43" type="button" value="progress-3" />
        <input id="btn44" type="button" value="progress-4" />
        <input id="btn45" type="button" value="progress-5" />
        <input id="btn46" type="button" value="progress-6" />
        <input id="btn47" type="button" value="progress-7" />
        <input id="btn48" type="button" value="progress-8" />
        <input id="btn49" type="button" value="progress-bar" />
        <input id="btn50" type="button" value="progress-close" />

        <br /><br /><hr /><br />

        <input id="btn51" type="button" value="solicit-1" />
        <input id="btn52" type="button" value="solicit-2" />
        <input id="btn53" type="button" value="solicit-3" />
        <input id="btn54" type="button" value="solicit-4" />
        <input id="btn55" type="button" value="solicit-5" />

        <br /><br /><hr /><br />

        <input id="btn61" type="button" value="buttons-1" />
        <input id="btn62" type="button" value="buttons-2" />
        <input id="btn63" type="button" value="buttons-3" />
        <input id="btn64" type="button" value="buttons-4" />
        <input id="btn65" type="button" value="buttons-5" />
        <input id="btn66" type="button" value="buttons-6" />
        <input id="btn67" type="button" value="buttons-7" />

    </div>

</body>
</html>
